<template>
  <!-- <m-header title="登录"/> -->
  <div class="login">
    <!-- <div class="header"> -->
      <!-- <img src="../../assets/img/logo.jpg" alt=""> -->
      <!-- <span>oup</span>
    </div> -->

    <!-- <van-form @submit="onSubmit">
      <van-field v-model="user.username" name="name" label="账号" placeholder="soup号/手机号/邮箱"
        :rules="[{ required: true, message: '请输入soup号/手机号/邮箱' }]" />
      <van-field v-model="user.password" type="password" name="password" label="密码" placeholder="请输入密码"
        :rules="[{ required: true, message: '请填写密码' }]" />
      <div style="margin: 16px;">
        <van-button @submit="onSubmit" round block type="primary" native-type="submit">
          登录
        </van-button>
      </div>
    </van-form>
    <div class="action"> -->
      <!-- <router-link to="/forget">忘记密码</router-link>
        <router-link to="/register">用户注册</router-link> -->
    <!-- </div> -->
  </div>
</template>
<script lang="ts" setup>
// import MHeader from '@/components/MHeader'
// import { showToast, } from 'vant'

// import { reactive, ref, toRefs } from 'vue'
// import { useRouter } from 'vue-router'
// import { useStore } from 'vuex'
// import useStorage from '@/hooks/useStorage'

// const { setStorage, getStorage, removeStorage } = useStorage()


// // 定义user对象
// const user = ref({
//   username: '',
//   password: '',
//   id: '234'
// })
// // 定义路由
// const router = useRouter()
// // 定义vuex 
// const store = useStore()
// const onSubmit = async (values) => {
//   console.log(user.value)
//   setStorage('session','user',user.value)

   
//   store.commit('setUser', user.value)
//   showToast('提示内容');
//   router.push('/')
// }



</script>
<style lang="scss" scoped>
.login {
  margin-top: 25vh;
  display: flex;
  align-items: center;
  flex-direction: column;

  .header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;

    img {
      width: 50px;
    }

    span {
      margin-left: 1px;
      font-size: 50px;
      font-weight: bold;
    }
  }

  .action {
    position: fixed;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: space-around;
  }
}
</style>